package com.fr.report.write.config;

import com.fr.data.core.db.dialect.Dialect;
import com.fr.data.core.db.dialect.DialectFactory;
import com.fr.data.core.db.dml.Delete;
import com.fr.data.core.db.dml.Where;
import com.fr.report.script.Calculator;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.Map;

public class DeleteConfig extends DMLConfig
{
  public void dmlSubmit(Connection paramConnection, Calculator paramCalculator, Object[] paramArrayOfObject, Map paramMap)
    throws SQLException
  {
    Where localWhere = generateWhere(paramConnection, paramCalculator, paramArrayOfObject);
    if ((localWhere == null) || (this.table == null))
      return;
    Dialect localDialect = DialectFactory.generateDialect(paramConnection);
    Delete localDelete = new Delete(this.table, localDialect);
    localDelete.setWhere(localWhere);
    localDelete.execute(paramConnection);
  }
}